/**
 * 
 */
package com.thon.dao.project.impl;


import org.springframework.stereotype.Repository;

import com.thon.dao.project.ProjectAdDao;
import com.thon.dao.util.AbstractDao;
import com.thon.entity.project.ProjectAd;

/**
 * @file ProjectAdDaoImpl.java
 * @author Zemo
 * @mail zemochen@gmail.com
 * @data 2013年10月11日 上午11:33:02
 * @description: TODO
 */
@Repository
public class ProjectAdDaoImpl extends AbstractDao<ProjectAd> implements ProjectAdDao{
	
	public ProjectAdDaoImpl(){
		super(ProjectAd.class);
	}

	@Override
	public Object getProjectAdByNow(Integer projectId) {
		String sqlString="SELECT ym_project_ads.id,ym_project_ads.content"
				+ " ,ym_project_ads.created_date,ym_project_ads.project_id,ym_project_ads.title"
				+ " FROM ym_project_ads"
				+ " WHERE ym_project_ads.project_id=?"
				+ " ORDER BY ym_project_ads.created_date DESC LIMIT 0,1";
		return findOneBySQL(sqlString, projectId);
	}
}
